import request from '@/utils/request'

// 查询客户电子会员卡充值消费记录列表
export function listRecord(query) {
  return request({
    url: '/customer/record/list',
    method: 'get',
    params: query
  })
}

// 查询客户电子会员卡充值消费记录详细
export function getRecord(id) {
  return request({
    url: '/customer/record/' + id,
    method: 'get'
  })
}

// 新增客户电子会员卡充值消费记录
export function addRecord(data) {
  return request({
    url: '/customer/record',
    method: 'post',
    data: data
  })
}

// 修改客户电子会员卡充值消费记录
export function updateRecord(data) {
  return request({
    url: '/customer/record',
    method: 'put',
    data: data
  })
}

// 删除客户电子会员卡充值消费记录
export function delRecord(id) {
  return request({
    url: '/customer/record/' + id,
    method: 'delete'
  })
}

// 导出客户电子会员卡充值消费记录
export function exportRecord(query) {
  return request({
    url: '/customer/record/export',
    method: 'get',
    params: query
  })
}

// 查询客户电子会员汇总数据
export function listSum(query) {
  return request({
    url: '/customer/cardsetting/list',
    method: 'get',
    params: query
  })
}

// 查询客户电子会员汇总数据
export function amtList(query) {
  return request({
    url: '/customer/cardsetting/list',
    method: 'get',
    params: query
  })
}

// 余额明细---退款
export function refundApi(id){
  return request({
    url:`/customer/card/refund/`,
    params:{id},
    method:'get',
  })
}


// 余额明细--导出
export function exportBalanceApi(query){
  return request({
    url:`/customer/record/export`,
    params:query,
    method:'get'
  })
}